package com.conference.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import com.conference.service.ConferenceListService;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/conferences")
public class ConferenceListController {

    @Autowired
    private ConferenceListService conferenceListService;

    @GetMapping("/all")
    public ResponseEntity<List<Map<String, Object>>> getAllConferences() {
        List<Map<String, Object>> conferences = conferenceListService.getAllConferences();
        return ResponseEntity.ok(conferences);
    }

    @GetMapping("/published")
    public ResponseEntity<List<Map<String, Object>>> getPublishedConferences() {
        List<Map<String, Object>> conferences = conferenceListService.getPublishedConferences();
        return ResponseEntity.ok(conferences);
    }

    @GetMapping("/upcoming")
    public ResponseEntity<List<Map<String, Object>>> getUpcomingConferences() {
        List<Map<String, Object>> conferences = conferenceListService.getUpcomingConferences();
        return ResponseEntity.ok(conferences);
    }
} 